import java.util.Scanner;

public class TestDome {

//        求斐波那契数列<迭代>
    public static int fib2(int n) {
        if (n<0) {
            return -1;
        }
        if (n==1||n==2) {
            return 1;
        }
        int f1 = 1;
        int f2 = 2;
        int f3 = 0;
        for (int i = 3; i <= n; i++) {
            f3 = f1+f2;
            f1=f2;
            f2=f3;
        }
        return f3;
    }
//    求斐波那契数列<递归>
    public static int fib(int n) {
        if(n==1||n==2) {
            return 1;
        }
        return fib(n-1)+fib(n-2);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fib(n));
    }
}
